/*
 * Powered By XY
 * Since 2020
 */

package com.xy.biz.xd.dao;

import java.util.Collection;
import java.util.List;

import com.xy.biz.xd.domain.po.DocumentFlowHandlePO;
import com.xy.biz.xd.domain.query.DocumentFlowHandleQuery;

/**
 *
 *
 * @author wwj
 * @date 2021-2-4
 */
public interface DocumentFlowHandleDao {

	/**
	 * 保存多个
	 *
	 * @param collection
	 */
	int saveAllDocumentFlowHandle(Collection<DocumentFlowHandlePO> collection);

	/**
	 * 更新
	 *
	 * @param documentFlowHandlePO
	 */
	int updateDocumentFlowHandle(DocumentFlowHandlePO documentFlowHandlePO);

	/**
	 * 删除
	 *
	 * @param documentFlowHandleId
	 */
	int deleteDocumentFlowHandle(Long documentFlowHandleId);

	/**
	 * 查找一个
	 *
	 * @param documentFlowHandleId
	 * @return
	 */
	DocumentFlowHandlePO getDocumentFlowHandle(Long documentFlowHandleId);

	/**
	 * 查找多条
	 *
	 * @param collection
	 * @return
	 */
	List<DocumentFlowHandlePO> listDocumentFlowHandleById(Collection<Long> collection);

	/**
	 * 条件查找多条
	 *
	 * @param query 查找条件
	 * @return
	 */
	List<DocumentFlowHandlePO> listDocumentFlowHandle(DocumentFlowHandleQuery query);

	/**
	 * 条件统计个数
	 *
	 * @param query 查找条件
	 * @return
	 */
	int countDocumentFlowHandle(DocumentFlowHandleQuery query);

	/**
	 * 获得某个流程节点的最新处理
	 * @param query
	 * @return
	 */
    DocumentFlowHandlePO getLastPhaseHandle(DocumentFlowHandleQuery query);
}
